# import logging
# import threading
# import time
# from pathlib import Path
# import pytest
# from tools.ERP上传 import 退货退款上传
# from tools.decorators import log_decorator
# from DrissionPage import ChromiumPage, ChromiumOptions
# from tools.page import page_get
# from tools.获取日期 import get_date
# from 获取数据.获取售后退货退款 import 获取售后退货退款
# from datetime import datetime, timedelta
#
#
# @pytest.mark.run()
# @log_decorator
# def 历史售后退货退款_test(login_聚水潭):
#     page = page_get()
#     page('text=订单').click()
#     page('text=历史售后退货退款').click()
#     page.wait.ele_displayed('text=组合查询', timeout=60)
#     page.wait(20)
#     page('#status_Confirmed').click(by_js=True)
#     page('#status_waitconfirm').click(by_js=True)
#     page('#is_null_l_id').select('否')
#     # 定义起始日期和结束日期
#     date1 = datetime.strptime('2023-08-01', '%Y-%m-%d')
#     date2 = datetime.strptime('2024-01-31', '%Y-%m-%d')
#     # 定义间隔
#     interval = timedelta(days=3)
#     # 遍历日期并打印
#     date_start = date1
#     while date_start <= date2:
#         date_end = date_start + interval
#         if date_end > date2:
#             date_end = date2
#         print(date_start.strftime('%Y-%m-%d'), date_end.strftime('%Y-%m-%d'))
#         获取售后退货退款(date_start.strftime('%Y-%m-%d'), date_end.strftime('%Y-%m-%d'))
#         date_start = date_end + timedelta(days=1)
#         if date_end == date2:
#             break
#         time.sleep(0.5)
